//已投递
import React, { Component } from 'react';
import {
    View,
    Text,
    Image,
    ListView,
    TouchableOpacity,
} from 'react-native';

import { metwoStyle as styles } from '../../../../styles';

var Dimensions = require('Dimensions');
var width = Dimensions.get('window').width;
var height = Dimensions.get('window').height;



export default class Meone extends Component {

    // 初始化模拟数据
    constructor(props) {
        super(props);
        const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });
        this.state = {
            dataSource: ds.cloneWithRows([
                { name: 'John1', navigation: this.props.navigation },
                { name: 'John2', navigation: this.props.navigation },
                { name: 'John3', navigation: this.props.navigation },
            ])
        };
    }
    render() {
        return (
            <View style={styles.meoneall}>

                <Text style={styles.insttext2}>全部共5条信息</Text>
                <ListView
                    dataSource={this.state.dataSource}
                    renderRow={this.renderRow}
                    contentContainerStyle={styles.metwolist} />
            </View>
        )
    }

    renderRow(rowData) {
        return (
            <TouchableOpacity style={styles.metwoallin} onPress={() => { rowData.navigation.navigate('Postionin') }} activeOpacity={1}>
                <Image source={require('../../../img/app/boy.png')} style={styles.head} />
                <View style={[styles.metwoline,{width:width*0.75}]}>
                    
                    <View style={styles.metwo1}>
                        <Text style={styles.metwopoz}>Java高级工程师</Text>
                        <Text style={styles.metwomoney}>6k-8k</Text>
                    </View>
                    <View style={styles.metwo2}>
                        <Text style={styles.metwoname}>沈阳先知蓝创科技有限公司</Text>
                        <Text style={styles.metwotime}>一天前</Text>
                    </View>
                </View>
                
            </TouchableOpacity>

        )
    }
}